var CandidateGalery = {
	getGaleryGrid: function() {
		ajax({
			  url: baseURL + "candidate/galery",
			  cache: false,
			  type: "POST",
			  data: $('#ajax_form').serialize(),
			  async: false,
			  dataType: 'html',
			  success: function(data) {
				  $('#gridGalery').html(data);
			  }
			});
	},
	
	editPhoto: function(idphoto) {
		$.facebox(function() {
			ajax({
			  url: baseURL + "candidate/galery/edit/" + idphoto,
			  cache: false,
			  type: "POST",
			  async: false,
			  dataType: 'html',
			  success: function(data) { $.facebox(data) }
			});
		});
		
		return false;
	},
	
	deletePhoto: function(idphoto) {
		ajax({
			  url: baseURL + "candidate/galery/delete",
			  cache: false,
			  type: "POST",
			  data: 'id=' + idphoto,
			  async: false,
			  dataType: 'script'
			});
			
			return false;
	}
};